//
// datatable.scss
//

.dataTables_wrapper.container-fluid {
  padding: 0;
}

table.dataTable {
  margin-bottom: 15px !important;
  border-collapse: collapse !important;

  tbody {
    // Multi select table

    > tr.selected,
    > tr > .selected {
      background-color: $primary;

      td {
        border-color: $primary;
      }
    }
    td {
      &:focus {
        outline: none !important;
      }
    }
    // Key Tables
    th,
    td {
      &.focus {
        color: $primary;
        background-color: rgba($primary, 0.15);
        outline: 2px solid $primary !important;
        outline-offset: -1px;
      }
    }
  }
}

.dataTables_info {
  font-weight: $font-weight-medium;
}

// Responsive data table
table.dataTable.dtr-inline.collapsed {
  > tbody {
    > tr[role='row'] {
      > td,
      > th {
        &:first-child {
          &::before {
            top: $table-cell-padding;
            background-color: $success;
            box-shadow: $box-shadow-lg;
          }
        }
      }
    }
    > tr.parent {
      > td,
      > th {
        &:first-child {
          &::before {
            top: $table-cell-padding;
            background-color: $danger;
          }
        }
      }
    }
  }
}

// Data Table copy button
div.dt-button-info {
  z-index: 21;
  color: $white;
  text-align: center;
  background-color: $primary;
  border: none;
  border-radius: 3px;
  box-shadow: none;

  h2 {
    color: $white;
    background-color: rgba($white, 0.2);
    border-bottom: none;
  }
}

@include media-breakpoint-down(sm) {
  li.paginate_button.previous,
  li.paginate_button.next {
    display: inline-block;
    font-size: 1.5rem;
  }

  li.paginate_button {
    display: none;
  }
  .dataTables_paginate {
    ul {
      margin: $spacer 0 0 !important;
      text-align: center;
    }
  }
  div.dt-buttons {
    display: inline-table;
    margin-bottom: $spacer;
  }
}

.activate-select {
  .sorting_1 {
    background-color: $gray-100;
  }
}
